package com.lx.sync.consumer.job;

import com.lx.sync.consumer.service.SyncDataService;
import com.lx.sync.consumer.sync.SyncDemoService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @ClassName SyncDataJobHandler
 * @Description: //todo
 * @Author: 落雪
 * @CreateDate: 2025/6/5 23:15
 * @UpdateUser: 落雪
 * @UpdateDate: 2025/6/5 23:15
 * @UpdateRemark:
 * @Version: 1.0
 */
@Slf4j
@Component
@JobHandler(value = "syncDataJobHandler")
public class SyncDataJobHandler extends IJobHandler {

    @Autowired
    private SyncDemoService syncDemoService;
    @Override
    public ReturnT<String> execute(String s) throws Exception {
        syncDemoService.pullExternalDataAndSync();
        return ReturnT.SUCCESS;
    }
}
